libxl: store a copy of configuration when creating domain
authorWei Liu <wei.liu2@citrix.com>
Thu, 4 Sep 2014 22:43:11 +0000 (23:43 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Tue, 9 Sep 2014 11:46:23 +0000 (12:46 +0100)
commitaf1f8aa9899f5ff8a1783a49fe6f0c566b8b7bc7
tree0dcabf01b8c0278fab46bbaa49e4a110941043ea
parent72018008c89414092e7d6edb6775a90f151e66ec
libxl: store a copy of configuration when creating domain

The configuration is stored in libxl-json format. It will be used as
template to reconstruct domain configuration during runtime.

There's only one write to disk when domain creation finishes. We
therefore have a window that the domain exists but has no JSON config in
disk. We define this state as domain being created or destroyed. Any
other operations that need to access JSON config should bail.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
tools/libxl/libxl_create.c
tools/libxl/libxl_internal.c
tools/libxl/libxl_internal.h